<template>
  <div>
    <list ref="list" :disabled="!$permission.canRead()">
      <template #toolbar-left>
        
      </template>
      <!-- <template #column>
        <el-table-column
          label="操作"
          fixed="right"
          align="center"
          width="80"
          v-if="$permission.canWrite()"
        >
          <template slot-scope="{ row }">
            <el-button
              size="mini"
              type="text"
              icon="el-icon-edit"
              @click="edit(row)"
              :disabled="row.id < 0"
            />
          </template>
        </el-table-column>
      </template> -->
    </list>
  </div>
</template>

<script>
import list from "@/components/sso/user/list";
import curdMixins from "@/mixins/curd";
import api from "@/api/sso/user";

export default {
  components: {
    list
  },
  data() {
    return {
      testValue:"",
      loading: false,
    };
  },
  mixins: [curdMixins],
  created() {},
  methods: {
    updateInvoiceFromNuoNuo() {
      var rows = this.$refs.list.getCheckedRowsWithMessage();
      if (!rows) {
        return;
      }
      console.log(rows);
      var ids = rows.map((item) => item.id);
      console.log(ids);
      this.$confirm("确定要从诺诺系统获取信息更新当前发票吗？", "提示", {
        type: "warning",
      })
        .then(() => {
          this.loading = true;
          api.updateInvoiceFromNuoNuo(ids).then((res) => {
            this.$refs.list.reload();
            this.loading = false;
          });
        })
        .catch(() => {});
    },
  },
};
</script>